from typing import Protocol

from poker_bot.core.models.dto.account import AccountDTO
from poker_bot.domain.account import AccountEntity


class AccountRepo(Protocol):
    async def acquire_account_by_id(self, account_id: int) -> AccountEntity | None:
        raise NotImplementedError

    async def create_user_account(self, account: AccountEntity) -> AccountEntity:
        raise NotImplementedError

    async def update_account(self, account: AccountEntity) -> None:
        raise NotImplementedError


class AccountReader(Protocol):
    async def get_account_by_id(self, account_id: int) -> AccountDTO | None:
        raise NotImplementedError

    async def get_user_accounts(self, user_tg_id: int) -> list[AccountDTO]:
        raise NotImplementedError

    async def get_selected_user_account(self, user_tg_id: int) -> AccountDTO:
        raise NotImplementedError

    async def get_accounts_for_confirmation(self) -> list[AccountDTO]:
        raise NotImplementedError
